// 显示Lazy值

val b = 1
lazy val a = {
  1
}

a
a

// 异常处理

def func(): Nothing = {
  throw new IllegalArgumentException()
}

try {
  val test = scala.io.Source.fromFile("/tmp/xxx").mkString
} catch {
  case ex :java.lang.IllegalArgumentException => {
    println("IllegalArgumentException, say sth..")
  }
  case cf: java.io.FileNotFoundException => {
    println("xxx file not found")
  }
  case _: Exception => {
    println("Other exception")
  }
} finally {
  println("Ending....")
}
